<?php
namespace app\index\model;
use think\Model;
use think\Db;
class Userinfo1 extends Model
{
	public static $db;
	public function __construct()
	{
		parent::__construct();
		self::$db = Db::name('User');
	}
	//查询用户信息
	public function show($uid)
	{
		$data = self::$db->where("userId = $uid")->find();
		//返回数据
		return $data;
	}
	//修改手机号
	public function updateTel($uid,$tel){
		$res = Db::table('user')->update(['account' => $tel,'userId'=>$uid]);
		return $res;
	}
	//修改密码
	public function updatePwd($uid,$pwd){
		$res = Db::table('user')->update(['password' => $pwd,'userId'=>$uid]);
		return $res;
	}
}